﻿<DockPanel x:Class="HappyBa.Pages.SearchPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:loc="clr-namespace:HappyBa.Code.Localization"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:Mnk.Library.WpfControls.Components.CheckableTreeView;assembly=Mnk.Library.WpfControls"
             xmlns:captioned="clr-namespace:Mnk.Library.WpfControls.Components.Captioned;assembly=Mnk.Library.WpfControls"
             xmlns:components="clr-namespace:Mnk.Library.WpfControls.Components;assembly=Mnk.Library.WpfControls"
             xmlns:components1="clr-namespace:HappyBa.Components"
             mc:Ignorable="d" 
             d:MinHeight="640" d:MinWidth="800"
             d:Height="640" d:Width="800">
    <StatusBar DockPanel.Dock="Bottom">
        <StatusBarItem Content="{loc:Tr Releases}"/>
        <StatusBarItem Name="sbReleases"/>
        <StatusBarItem/>
        <StatusBarItem Content="{loc:Tr UserStories}"/>
        <StatusBarItem Name="sbUserStories"/>
        <StatusBarItem/>
        <StatusBarItem Content="{loc:Tr Tasks}"/>
        <StatusBarItem Name="sbTasks"/>
        <StatusBarItem/>
        <StatusBarItem Content="{loc:Tr Bugs}"/>
        <StatusBarItem Name="sbBugs"/>
        <StatusBarItem/>
        <StatusBarItem Content="{loc:Tr Done}"/>
        <StatusBarItem Name="sbDone"/>
        <StatusBarItem/>
        <StatusBarItem Content="{loc:Tr NotStarted}"/>
        <StatusBarItem Name="sbNotStarted"/>
        <StatusBarItem/>
        <StatusBarItem Content="{loc:Tr InDevelopment}"/>
        <StatusBarItem Name="sbInDevelopment"/>
        <StatusBarItem/>
        <StatusBarItem Content="{loc:Tr Failed}"/>
        <StatusBarItem Name="sbFailed"/>
        <StatusBarItem/>
        <StatusBarItem Content="{loc:Tr NotResolvedImpediments}"/>
        <StatusBarItem Name="sbNotResolvedImpediments"/>
    </StatusBar>
    <DockPanel Dock="Top">
        <DockPanel DockPanel.Dock="Top">
            <Button Content="{loc:Tr Search}" Click="SearchClick" DockPanel.Dock="Right" Padding="4 1" IsDefault="True"/>
            <TextBox Name="Querry" VerticalAlignment="Center" Margin="2"/>
        </DockPanel>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
            <Label Content="{loc:Tr State}" />
            <ComboBox Name="FilterState" Width="100" IsReadOnly="True" Margin="2 0" VerticalAlignment="Center" SelectionChanged="SearchClick" SelectedIndex="0">
                <ComboBoxItem Content="{loc:Tr All}"/>
                <ComboBoxItem Content="{loc:Tr ReadyToDev}"/>
                <ComboBoxItem Content="{loc:Tr InProgress}"/>
                <ComboBoxItem Content="{loc:Tr Done}"/>
                <ComboBoxItem Content="{loc:Tr Failed}"/>
            </ComboBox>
            <Label Content="{loc:Tr Type}" />
            <ComboBox Name="FilterType" Width="100" IsReadOnly="True" Margin="2 0" VerticalAlignment="Center" SelectionChanged="SearchClick" SelectedIndex="2">
                <ComboBoxItem Content="{loc:Tr All}"/>
                <ComboBoxItem Content="{loc:Tr UserStory}"/>
                <ComboBoxItem Content="{loc:Tr TaskOrBug}"/>
                <ComboBoxItem Content="{loc:Tr Task}"/>
                <ComboBoxItem Content="{loc:Tr Bug}"/>
            </ComboBox>
            <Label Content="{loc:Tr SearchBy}" />
            <ComboBox Name="FilterSearchBy" Width="100" IsReadOnly="True" Margin="2 0" VerticalAlignment="Center" SelectionChanged="SearchClick" SelectedIndex="2">
                <ComboBoxItem Content="{loc:Tr All}"/>
                <ComboBoxItem Content="{loc:Tr Id}"/>
                <ComboBoxItem Content="{loc:Tr Name}"/>
                <ComboBoxItem Content="{loc:Tr Description}"/>
            </ComboBox>
            <components:ExtCheckBox Name="HideEmptyUserStories" Content="{loc:Tr HideUserStoriesWithoutChilds}" IsChecked="True" VerticalAlignment="Center" Margin="5 0" ValueChanged="SearchClick"/>
            <components:ExtCheckBox Name="HideResolvedImpediments" Content="{loc:Tr HideResolvedImpediments}" IsChecked="True" VerticalAlignment="Center" Margin="5 0" ValueChanged="SearchClick"/>
        </StackPanel>
    </DockPanel>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition MinHeight="64"/>
            <RowDefinition Height="5"/>
            <RowDefinition MinHeight="64"/>
        </Grid.RowDefinitions>
        <DockPanel Grid.Row="0">
            <TreeView Name="View" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectedItemChanged="SelectionChanged">
                <TreeView.Resources>
                    <HierarchicalDataTemplate DataType="{x:Type local:Node}" ItemsSource="{Binding Children}">
                        <TextBlock Text="{Binding Data.Entity}" Margin="1" TextTrimming="CharacterEllipsis" TextWrapping="Wrap"/>
                    </HierarchicalDataTemplate>
                    <Style TargetType="TreeViewItem">
                        <Setter Property="IsExpanded" Value="{Binding Path=IsExpanded, Mode=TwoWay}" />
                    </Style>
                </TreeView.Resources>
            </TreeView>
        </DockPanel>
        <GridSplitter Grid.Row="1" HorizontalAlignment="Stretch"/>
        <components1:DetailsView x:Name="InfoView" Grid.Row="2"/>
    </Grid>
</DockPanel>
